# 文件名: data_count
# 当前用户: shiping.zheng
# 当前日期: 2024/9/26
# 当前时间: 14:54
# 项目名称: Flag
"""
模块描述:
    
"""
import logging

# 配置日志
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
class DataCount:

    def count(self, sql_value, url_value):
        if url_value is not None:
            value = sql_value - url_value
            if value == 0:
                logging.info("数据库与页面值相等,差值为：%f", value)
            elif -1 < value < 1:
                logging.info("数据库与页面值相差1,差值为：%f", value)
            else:
                logging.error("数据库与页面值相差大于1,差值为：%f", value)